function Cpwd1() {
    var pwd1 = document.getElementById("Tpwd1").value;
    if (pwd1.length == "") {
        document.getElementById("Rpwd1").style.color = "red";
        document.getElementById("Rpwd1").innerHTML = " <img src='img/error_tip.png'>请输入密码！";
        return false;
    }
    else if (pwd1.length < 6 || pwd1.length > 16) {
        document.getElementById("Rpwd1").style.color = "red";
        document.getElementById("Rpwd1").innerHTML = "<img src='img/error_tip.png'> 密码只能由6-16位字母、数字组成";
        return false;
    }
    else {
        document.getElementById("Rpwd1").style.color = "#1e8e04";
        document.getElementById("Rpwd1").innerHTML = " <img src='img/right_tip.png'>密码通过";
        return true;
    }
}
function Cpwd2() {
    var pwd1 = document.getElementById("Tpwd1").value;
    var pwd2 = document.getElementById("Tpwd2").value;
    if (pwd2.length == "") {
        document.getElementById("Rpwd2").style.color = "red";
        document.getElementById("Rpwd2").innerHTML = " <img src='img/error_tip.png'>请输入密码！";
        return false;
    }
    else if (pwd2.length < 6 || pwd2.length > 16) {
        document.getElementById("Rpwd2").style.color = "red";
        document.getElementById("Rpwd2").innerHTML = " <img src='img/error_tip.png'>密码只能由6-16位字母、数字组成";
        return false;
    }
    else if (pwd2 != pwd1) {
        document.getElementById("Rpwd2").style.color = "red";
        document.getElementById("Rpwd2").innerHTML = " <img src='img/error_tip.png'>请保持和上面密码的一致！";
        return false;
    }
    else {
        document.getElementById("Rpwd2").style.color = "#1e8e04";
        document.getElementById("Rpwd2").innerHTML = " <img src='img/right_tip.png'>验证密码通过";
        return true;
    }
}
function Cpwd3() {
    var pwd1 = document.getElementById("Tpwd").value;
    if (pwd1.length == "") {
        document.getElementById("Rpwd").style.color = "red";
        document.getElementById("Rpwd").innerHTML = " <img src='img/error_tip.png'>请输入密码！";
        return false;
    }
    else if (pwd1.length < 6 || pwd1.length > 16) {
        document.getElementById("Rpwd").style.color = "red";
        document.getElementById("Rpwd").innerHTML = "<img src='img/error_tip.png'> 密码只能由6-16位字母、数字组成";
        return false;
    }
    else {
        document.getElementById("Rpwd").style.color = "#1e8e04";
        document.getElementById("Rpwd").innerHTML = " <img src='img/right_tip.png'>密码通过";
        return true;
    }
}

function check() {
    if (Cpwd3() && Cpwd2() && Cpwd1()) {
        return true;
    }
    else {
        alert("您的输入有误！请重新输入！");
        return false;
    }
}